/*
 * @Date: 2024-11-19 11:32:23
 * @Author: LiSong
 * @LastEditors: LiSong
 * @LastEditTime: 2025-01-23 14:32:23
 * @Description: 
 */
import { defAxios as request } from '@/utils/http';

export function useFilesSzysApi() {
	return {
		uploadSzysFile(data) {
			return request({
				url: '/proResApply/parse',
				method: 'post',
				data: data,
				headers: {
					'Content-Type': 'multipart/form-data;',
				},
			});
		},
		downloadSzysTemplate(params) {
			return request({
				url: `/proResApply/szysTemplateDownLoad`,
				method: 'get',
				responseType: 'blob',
				params
			});
		},
		/**
		 * 获取收支预算表格数据
		 * 
		 * @param {Object} params { proId, proTypeId }
		 * @returns axios
		 */
		getSzysDataByProId(params) {
			return request({
        url: '/proResApply/queryBgtBalanceByProId',
        method: 'POST',
        data: params,
			});
		},
		/**
		 * 获取收支预算表格数据
		 * 
		 * @param {Object} params { proId }
		 * @returns axios
		 */
		getSzysDataByProIdFormAd51(params) {
			return request({
        url: '/resApply/ad51/getSZYS ',
        method: 'POST',
        data: params,
			});
		}
	};
}
